package com.easyjob.entity.vo;

import com.easyjob.annotation.VerifyParam;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author Const
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ImportQuestionVo {

    @VerifyParam(required = true)
    private String title;

    @VerifyParam(required = true)
    private String chapterIds;

    @VerifyParam(required = true)
    private String difficultyLevel;

    @VerifyParam(required = true)
    private String type;

    @VerifyParam(required = true)
    private String answer;

    @JsonProperty("questionItems") // 确保与前端字段名一致
    private List<QuestionItemVo> questionItem;

    private String question;

    private String analysis;

    private String sort;

    // 静态内部类
    public static class QuestionItemVo {

        private String title;

        private String sort;

        // 无参构造函数
        public QuestionItemVo() {
        }

        // 有参构造函数
        public QuestionItemVo(String title, String sort) {
            this.title = title;
            this.sort = sort;
        }

        // title 属性的 getter 方法
        public String getTitle() {
            return title;
        }

        // title 属性的 setter 方法
        public void setTitle(String title) {
            this.title = title;
        }

        // sort 属性的 getter 方法
        public String getSort() {
            return sort;
        }

        // sort 属性的 setter 方法
        public void setSort(String sort) {
            this.sort = sort;
        }
    }
}
